package com.cmfi.domain;

import java.time.Instant;

import com.cmfi.utils.ExcelImport;

import lombok.Data;

/**
 * A ForkliftPlan.
 */
@Data
public class ForkliftPlan {

    private Long id;

    /**
     * 产线
     */
    private String line;

    /**
     * 状态
     */
    private String forkliftStatus;

    /**
     * 创建时间
     */
    private Instant createTime;

    /**
     * 更新时间
     */
    private Instant updateTime;

    /**
     * 生产单号
     */
    @ExcelImport(value = "生产单号", unique = true)
    private String produceNo;//生产单号

    /**
     * 上线顺序
     */
    @ExcelImport(value = "上线顺序", unique = true)
    private String sequence;

    /**
     * VIN
     */
    @ExcelImport(value = "VIN", unique = true)
    private String vinCode;

    /**
     * 物料号
     */
    @ExcelImport(value = "物料号", unique = true)
    private String materialCode;

    /**
     * 物料俗称
     */
    @ExcelImport("物料俗称")
    private String materialName;
    
    /**
     * 是否已经下发给了PLC
     */
    //2.感觉还是应该重新设置一下字段的值，尽量先和boolean对应，0待下发，1下发完成，2下发中
    private int isReleased = 0;//1.工单状态，0待下发，1暂停下发，2下发完成，大部分需要置标记处都还没改

    /**
     * 调度状态
     */
    private String dispatchStatus;

    /**
     * 计划日期
     */
    private String planDate;

    /**
     * 计划顺序
     */
    private String planSequence;

    /**
     * 计划开工日期
     */
    private String planStartDate;

    /**
     * 上线标记
     */
    private String onlineFlag;

    /**
     * 下线标记
     */
    private String offlineFlag;

    /**
     * 上线时间
     */
    private long onlineTime;

    /**
     * 下线时间
     */
    private long offlineTime;

    /**
     * 拧紧质量
     */
    private String tightenQuality;

    /**
     * 拧紧nm&
     */
    private String tightenNM;

    /**
     * BOM型号
     */
    @ExcelImport("BOM型号")
    private String bomCode;//先取这个字段作为车架号

    /**
     * 动态上线时间31
     */
    private long dynamicOnlineTime31;

    /**
     * 动态下线时间
     */
    private long dynamicOfflineTime;

    /**
     * 入库仓库号
     */
    private String repositoryCode;

    /**
     * ID
     */
    private String planId;

    /**
     * ID当前标记
     */
    private String planIdFlag;

    /**
     * BOM日期
     */
    private String bomDate;

    /**
     * BOM版本
     */
    private String bomVersion;

    @ExcelImport("吨位")
    private String tonnage;

    private String planEndDate;

    private String onlinePerDate;

    private String onlinePer;

    private String onlineSequence;

    private String offlinePerDate;

    private String onlinePer24;

    private String dynamicOnlineTime;

    // jhipster-needle-entity-add-field - JHipster will add fields here

    public Long getId() {
        return this.id;
    }

    public ForkliftPlan id(Long id) {
        this.setId(id);
        return this;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLine() {
        return this.line;
    }

    public ForkliftPlan line(String line) {
        this.setLine(line);
        return this;
    }

    public void setLine(String line) {
        this.line = line;
    }

    public String getForkliftStatus() {
        return this.forkliftStatus;
    }

    public ForkliftPlan forkliftStatus(String forkliftStatus) {
        this.setForkliftStatus(forkliftStatus);
        return this;
    }

    public void setForkliftStatus(String forkliftStatus) {
        this.forkliftStatus = forkliftStatus;
    }

    public Instant getCreateTime() {
        return this.createTime;
    }

    public ForkliftPlan createTime(Instant createTime) {
        this.setCreateTime(createTime);
        return this;
    }

    public void setCreateTime(Instant createTime) {
        this.createTime = createTime;
    }

    public Instant getUpdateTime() {
        return this.updateTime;
    }

    public ForkliftPlan updateTime(Instant updateTime) {
        this.setUpdateTime(updateTime);
        return this;
    }

    public void setUpdateTime(Instant updateTime) {
        this.updateTime = updateTime;
    }

    public String getProduceNo() {
        return this.produceNo;
    }

    public ForkliftPlan produceNo(String produceNo) {
        this.setProduceNo(produceNo);
        return this;
    }

    public void setProduceNo(String produceNo) {
        this.produceNo = produceNo;
    }

    public String getSequence() {
        return this.sequence;
    }

    public ForkliftPlan sequence(String sequence) {
        this.setSequence(sequence);
        return this;
    }

    public void setSequence(String sequence) {
        this.sequence = sequence;
    }

    public String getVinCode() {
        return this.vinCode;
    }

    public ForkliftPlan vinCode(String vinCode) {
        this.setVinCode(vinCode);
        return this;
    }

    public void setVinCode(String vinCode) {
        this.vinCode = vinCode;
    }

    public String getMaterialCode() {
        return this.materialCode;
    }

    public ForkliftPlan materialCode(String materialCode) {
        this.setMaterialCode(materialCode);
        return this;
    }

    public void setMaterialCode(String materialCode) {
        this.materialCode = materialCode;
    }

    public String getMaterialName() {
        return this.materialName;
    }

    public ForkliftPlan materialName(String materialName) {
        this.setMaterialName(materialName);
        return this;
    }

    public void setMaterialName(String materialName) {
        this.materialName = materialName;
    }

    public String getDispatchStatus() {
        return this.dispatchStatus;
    }

    public ForkliftPlan dispatchStatus(String dispatchStatus) {
        this.setDispatchStatus(dispatchStatus);
        return this;
    }

    public void setDispatchStatus(String dispatchStatus) {
        this.dispatchStatus = dispatchStatus;
    }

    public String getPlanDate() {
        return this.planDate;
    }

    public ForkliftPlan planDate(String planDate) {
        this.setPlanDate(planDate);
        return this;
    }

    public void setPlanDate(String planDate) {
        this.planDate = planDate;
    }

    public String getPlanSequence() {
        return this.planSequence;
    }

    public ForkliftPlan planSequence(String planSequence) {
        this.setPlanSequence(planSequence);
        return this;
    }

    public void setPlanSequence(String planSequence) {
        this.planSequence = planSequence;
    }

    public String getPlanStartDate() {
        return this.planStartDate;
    }

    public ForkliftPlan planStartDate(String planStartDate) {
        this.setPlanStartDate(planStartDate);
        return this;
    }

    public void setPlanStartDate(String planStartDate) {
        this.planStartDate = planStartDate;
    }

    public String getOnlineFlag() {
        return this.onlineFlag;
    }

    public ForkliftPlan onlineFlag(String onlineFlag) {
        this.setOnlineFlag(onlineFlag);
        return this;
    }

    public void setOnlineFlag(String onlineFlag) {
        this.onlineFlag = onlineFlag;
    }

    public String getOfflineFlag() {
        return this.offlineFlag;
    }

    public ForkliftPlan offlineFlag(String offlineFlag) {
        this.setOfflineFlag(offlineFlag);
        return this;
    }

    public void setOfflineFlag(String offlineFlag) {
        this.offlineFlag = offlineFlag;
    }

    public long getOnlineTime() {
        return this.onlineTime;
    }

    public ForkliftPlan onlineTime(long onlineTime) {
        this.setOnlineTime(onlineTime);
        return this;
    }

    public void setOnlineTime(long onlineTime) {
        this.onlineTime = onlineTime;
    }

    public long getOfflineTime() {
        return this.offlineTime;
    }

    public ForkliftPlan offlineTime(long offlineTime) {
        this.setOfflineTime(offlineTime);
        return this;
    }

    public void setOfflineTime(long offlineTime) {
        this.offlineTime = offlineTime;
    }

    public String getTightenQuality() {
        return this.tightenQuality;
    }

    public ForkliftPlan tightenQuality(String tightenQuality) {
        this.setTightenQuality(tightenQuality);
        return this;
    }

    public void setTightenQuality(String tightenQuality) {
        this.tightenQuality = tightenQuality;
    }

    public String getTightenNM() {
        return this.tightenNM;
    }

    public ForkliftPlan tightenNM(String tightenNM) {
        this.setTightenNM(tightenNM);
        return this;
    }

    public void setTightenNM(String tightenNM) {
        this.tightenNM = tightenNM;
    }

    public String getBomCode() {
        return this.bomCode;
    }

    public ForkliftPlan bomCode(String bomCode) {
        this.setBomCode(bomCode);
        return this;
    }

    public void setBomCode(String bomCode) {
        this.bomCode = bomCode;
    }

    public long getDynamicOnlineTime31() {
        return this.dynamicOnlineTime31;
    }

    public ForkliftPlan dynamicOnlineTime31(long dynamicOnlineTime31) {
        this.setDynamicOnlineTime31(dynamicOnlineTime31);
        return this;
    }

    public void setDynamicOnlineTime31(long dynamicOnlineTime31) {
        this.dynamicOnlineTime31 = dynamicOnlineTime31;
    }

    public long getDynamicOfflineTime() {
        return this.dynamicOfflineTime;
    }

    public ForkliftPlan dynamicOfflineTime(long dynamicOfflineTime) {
        this.setDynamicOfflineTime(dynamicOfflineTime);
        return this;
    }

    public void setDynamicOfflineTime(long dynamicOfflineTime) {
        this.dynamicOfflineTime = dynamicOfflineTime;
    }

    public String getRepositoryCode() {
        return this.repositoryCode;
    }

    public ForkliftPlan repositoryCode(String repositoryCode) {
        this.setRepositoryCode(repositoryCode);
        return this;
    }

    public void setRepositoryCode(String repositoryCode) {
        this.repositoryCode = repositoryCode;
    }

    public String getPlanId() {
        return this.planId;
    }

    public ForkliftPlan planId(String planId) {
        this.setPlanId(planId);
        return this;
    }

    public void setPlanId(String planId) {
        this.planId = planId;
    }

    public String getPlanIdFlag() {
        return this.planIdFlag;
    }

    public ForkliftPlan planIdFlag(String planIdFlag) {
        this.setPlanIdFlag(planIdFlag);
        return this;
    }

    public void setPlanIdFlag(String planIdFlag) {
        this.planIdFlag = planIdFlag;
    }

    public String getBomDate() {
        return this.bomDate;
    }

    public ForkliftPlan bomDate(String bomDate) {
        this.setBomDate(bomDate);
        return this;
    }

    public void setBomDate(String bomDate) {
        this.bomDate = bomDate;
    }

    public String getBomVersion() {
        return this.bomVersion;
    }

    public ForkliftPlan bomVersion(String bomVersion) {
        this.setBomVersion(bomVersion);
        return this;
    }

    public void setBomVersion(String bomVersion) {
        this.bomVersion = bomVersion;
    }

    public String getTonnage() {
        return this.tonnage;
    }

    public ForkliftPlan tonnage(String tonnage) {
        this.setTonnage(tonnage);
        return this;
    }

    public void setTonnage(String tonnage) {
        this.tonnage = tonnage;
    }

    public String getPlanEndDate() {
        return this.planEndDate;
    }

    public ForkliftPlan planEndDate(String planEndDate) {
        this.setPlanEndDate(planEndDate);
        return this;
    }

    public void setPlanEndDate(String planEndDate) {
        this.planEndDate = planEndDate;
    }

    public String getOnlinePerDate() {
        return this.onlinePerDate;
    }

    public ForkliftPlan onlinePerDate(String onlinePerDate) {
        this.setOnlinePerDate(onlinePerDate);
        return this;
    }

    public void setOnlinePerDate(String onlinePerDate) {
        this.onlinePerDate = onlinePerDate;
    }

    public String getOnlinePer() {
        return this.onlinePer;
    }

    public int getIsReleased() {
		return isReleased;
	}

	public void setIsReleased(int isReleased) {
		this.isReleased = isReleased;
	}

	public ForkliftPlan onlinePer(String onlinePer) {
        this.setOnlinePer(onlinePer);
        return this;
    }

    public void setOnlinePer(String onlinePer) {
        this.onlinePer = onlinePer;
    }

    public String getOnlineSequence() {
        return this.onlineSequence;
    }

    public ForkliftPlan onlineSequence(String onlineSequence) {
        this.setOnlineSequence(onlineSequence);
        return this;
    }

    public void setOnlineSequence(String onlineSequence) {
        this.onlineSequence = onlineSequence;
    }

    public String getOfflinePerDate() {
        return this.offlinePerDate;
    }

    public ForkliftPlan offlinePerDate(String offlinePerDate) {
        this.setOfflinePerDate(offlinePerDate);
        return this;
    }

    public void setOfflinePerDate(String offlinePerDate) {
        this.offlinePerDate = offlinePerDate;
    }

    public String getOnlinePer24() {
        return this.onlinePer24;
    }

    public ForkliftPlan onlinePer24(String onlinePer24) {
        this.setOnlinePer24(onlinePer24);
        return this;
    }

    public void setOnlinePer24(String onlinePer24) {
        this.onlinePer24 = onlinePer24;
    }

    public String getDynamicOnlineTime() {
        return this.dynamicOnlineTime;
    }

    public ForkliftPlan dynamicOnlineTime(String dynamicOnlineTime) {
        this.setDynamicOnlineTime(dynamicOnlineTime);
        return this;
    }

    public void setDynamicOnlineTime(String dynamicOnlineTime) {
        this.dynamicOnlineTime = dynamicOnlineTime;
    }

    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof ForkliftPlan)) {
            return false;
        }
        return id != null && id.equals(((ForkliftPlan) o).id);
    }

    @Override
    public int hashCode() {
        // see https://vladmihalcea.com/how-to-implement-equals-and-hashcode-using-the-jpa-entity-identifier/
        return getClass().hashCode();
    }
    
    

    // prettier-ignore
    @Override
    public String toString() {
        return "ForkliftPlan{" +
            "id=" + getId() +
            ", line='" + getLine() + "'" +
            ", forkliftStatus='" + getForkliftStatus() + "'" +
            ", createTime='" + getCreateTime() + "'" +
            ", updateTime='" + getUpdateTime() + "'" +
            ", produceNo='" + getProduceNo() + "'" +
            ", sequence='" + getSequence() + "'" +
            ", vinCode='" + getVinCode() + "'" +
            ", materialCode='" + getMaterialCode() + "'" +
            ", materialName='" + getMaterialName() + "'" +
            ", dispatchStatus='" + getDispatchStatus() + "'" +
            ", planDate='" + getPlanDate() + "'" +
            ", planSequence='" + getPlanSequence() + "'" +
            ", planStartDate='" + getPlanStartDate() + "'" +
            ", onlineFlag='" + getOnlineFlag() + "'" +
            ", offlineFlag='" + getOfflineFlag() + "'" +
            ", onlineTime='" + getOnlineTime() + "'" +
            ", offlineTime='" + getOfflineTime() + "'" +
            ", tightenQuality='" + getTightenQuality() + "'" +
            ", tightenNM='" + getTightenNM() + "'" +
            ", bomCode='" + getBomCode() + "'" +
            ", dynamicOnlineTime31='" + getDynamicOnlineTime31() + "'" +
            ", dynamicOfflineTime='" + getDynamicOfflineTime() + "'" +
            ", repositoryCode='" + getRepositoryCode() + "'" +
            ", planId='" + getPlanId() + "'" +
            ", planIdFlag='" + getPlanIdFlag() + "'" +
            ", bomDate='" + getBomDate() + "'" +
            ", bomVersion='" + getBomVersion() + "'" +
            ", tonnage='" + getTonnage() + "'" +
            ", planEndDate='" + getPlanEndDate() + "'" +
            ", onlinePerDate='" + getOnlinePerDate() + "'" +
            ", onlinePer='" + getOnlinePer() + "'" +
            ", onlineSequence='" + getOnlineSequence() + "'" +
            ", offlinePerDate='" + getOfflinePerDate() + "'" +
            ", onlinePer24='" + getOnlinePer24() + "'" +
            ", dynamicOnlineTime='" + getDynamicOnlineTime() + "'" +
            "}";
    }
}
